home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / wced18c.zip / WCED.DOC < prev    next >
Text File  |  1993-07-11  |  9KB  |  254 lines

  1. Wced 1.8c Command Line Editor
  2.  
  3. Copyright (C) 1990, 1991, 1992, 1993 Stuart Russell (WormSoft)
  4.  
  5. Wced is a command line editor. Features include a history of
  6. commands typed, aliasing of commands (with parameters), filename
  7. completion and command line editing. The main aim of Wced is to
  8. improve the command line editing of DOS but use as little memory as 
  9. possible. When installed, wced uses approximately 14k of 
  10. conventional memory. Wcedlite performs like Wced but has no alias
  11. functions.
  12.  
  13. Usage
  14.           wced [-acdflpqst] [filespec]
  15.  
  16. Options
  17.      a -  Filenames are listed in alphabetical order.
  18.  
  19.      c -  Makes the history list circular. Normally command completion
  20.           stops at either end of the history list. 
  21.  
  22.      d -  Directories in lists have a trailing '\'.
  23.  
  24.      f -  The <CompShow> key results in CompShowPath, rather than CompShow,
  25.           being executed on the first argument of the command line.
  26.  
  27.      l -  All filenames are listed in lowercase.
  28.  
  29.      p -  List files on PATH matching given filespec. Wced will
  30.           NOT become resident.
  31.  
  32.      q -  The bell is not sounded when the start or end of the 
  33.           history list is reached.
  34.  
  35.      s -  Filenames matching the following filespec are listed. 
  36.           The default filespec is *.*. Wced will NOT become 
  37.           resident.
  38.  
  39.      t -  Translate the wced command buffer to make it DOS compatible.
  40.           ie. '\string\string\' -> 'string\string'
  41.               '\' -> '\'
  42.  
  43. 1. Reading Initial Commands and Aliases
  44.  
  45. If not invoked with the 's' or 'p' flag and a filename exists on
  46. the command line Wced will attempt to read initial commands and/or
  47. aliases from the file. The alias definition has the following 
  48. format:
  49.  
  50.         wced alias fullstring 
  51.  
  52. For example, 'wced d dir' aliases 'd' to 'dir'. Subsequently, if 
  53. 'd' is the first word on the command line then it is substituted 
  54. with 'dir'.
  55.  
  56. Any line not beginning with 'wced' is treated as a command and is 
  57. placed into the history list.
  58.  
  59. 2. Alias Parameters
  60.  
  61. The aliases can have parameters in their definitions. For 
  62. example,
  63.  
  64.         wced ld hotdir %0 /d/2
  65.  
  66. aliases 'ld' to 'hotdir %0 /d/2'. The %0 will be replaced with the 
  67. first argument given on the command line, ie.
  68.  
  69.         C:>ld list.*
  70. will result in DOS executing
  71.         hotdir list.* /d/2
  72.  
  73. Another example shows how all arguments can be used.
  74.  
  75.         wced del del %* /p
  76.  
  77. This aliases 'del' to 'del %* /p'. The %* will be replaced by all 
  78. arguments on the command line, ie.
  79.  
  80.         del tom dick harry
  81. will result in DOS executing
  82.         del tom dick harry /p
  83.  
  84. In DOS >= 4.0 this will prompt before deleting the file(s).
  85. The parameters can also be used in definitions entered from the 
  86. command line (as described below).
  87.  
  88. 3. The Editing and History functions
  89.  
  90. The default editing and history keys are :
  91.  
  92. Left Arrow     Move cursor left one place along command line
  93. Right Arrow    Move cursor right one place along command line
  94. Ctrl-Left      Move cursor left to end of word
  95. Ctrl-Right     Move cursor right to end of word
  96. Home           Move to beginning of command line
  97. End            Move to end of command line
  98. Up Arrow       Move backwards (older) through history
  99. Down Arrow     Move forwards (newer) through history
  100. Alt-d          Delete entire command line
  101. Del            Delete character under cursor on command line
  102. BS             Delete character before cursor on command line
  103. Alt-x          Quit and uninstall Wced
  104. Alt-r          Remove entry on command line from history
  105. Alt-v          Print version
  106. Alt-b          Delete to beginning of command line
  107. Alt-e          Delete to end of command line
  108. Ctrl-c         Store but do not execute command on command line
  109.  
  110. Each function can have two keys assigned to it.
  111. Wced only operates in insert mode - there is no overtype mode.
  112.  
  113. The history commands will attempt to complete the command on the 
  114. command line. An example is shown below.
  115. Assume the history contains
  116.      ls
  117.      cd backup
  118.      less nogood
  119.      larn
  120.      worm <--- Most recent
  121.  
  122. If the user now does
  123. C:>l_<UPARROW>
  124. then the command line will be completed as
  125. C:>larn_
  126. with the cursor on the end of the line.
  127. If the <UPARROW> is pressed again the command line becomes
  128. C:>less nogood_
  129. and again ...
  130. C:>ls_
  131. The cursor is always placed at the end of the line. The feedback 
  132. I have received suggests that people prefer this. If Wced can not 
  133. complete the command it will sound the bell unless the 'q' flag 
  134. has been specified.
  135.  
  136. 4. The Alias functions (NOT available in wcedlite)
  137.  
  138. The alias functions of wced are accessed using Alt-a. The action 
  139. taken depends on the contents of the command line. If the command 
  140. line is empty then a list of current aliases is printed. If the 
  141. command line contains only one word then this is assumed to be an 
  142. alias that is to be removed from the alias table. If the alias 
  143. can not be matched then an error message is printed. If the 
  144. command line contains more than one word then the alias is added 
  145. to the alias table replacing a previous alias if necessary. Some 
  146. examples follow.
  147.  
  148. Adding:
  149.      C:>l ls %*<ALT-a>
  150.      C:>pkv pkunzip -vb %*<ALT-a>
  151. This adds the aliases l and pkv to the alias table.
  152.  
  153. Listing:
  154.      C:><ALT-a>
  155.      l = ls %*
  156.      pkv = pkunzip -vb %*
  157. This prints the current aliases.
  158.  
  159. Deleting:
  160.      C:>l<ALT-a>
  161. This deletes an entry from the alias table.
  162.      C:><ALT-a>
  163.      pkv = pkunzip -vb %*
  164.  
  165. Aliases may contain multiple commands seperated by the '^' character.
  166. For example:
  167.      C:>cd cd %0 ^ls<ALT-a>
  168.      C:>cd fred<Return>
  169. This will change into the directory 'fred' and then list the files in the
  170. directory.
  171. NOTE: The space between %0 and ^ above is very important. If the argument
  172. replacing %0 has a trailing slash then the space ensures it will be removed,
  173. assuming Wced was invoked with the 't' option.
  174.  
  175. 5. Filename Completion/Show
  176.  
  177. The filename completion/show functions are assigned to :
  178.  
  179. Alt-c          Complete filename
  180. Alt-s          Show possible filename completions
  181. Tab            Attempt to complete filename/show possible 
  182.                completions
  183. Ctrl-Tab       Complete/Show matching files on PATH
  184.  
  185. Filenames will be completed as far as possible. When the 
  186. completion becomes ambiguous the possible matching files 
  187. will be displayed.
  188. For example consider the following files.
  189.      backup\   buffer.c  buffer.h  buffer.obj
  190.      list.c    list.h    list.obj
  191.      wced.exe  wced.doc  wced17.zip
  192.  
  193. Pressing <Tab> on an empty line will produce a listing of the 
  194. entire directory contents.
  195.      C:><Tab>
  196.      backup\   list.c    wced.doc
  197.      buffer.c  list.h    wced.exe
  198.      buffer.h  list.obj  wced17.zip
  199.      buffer.obj
  200.  
  201. The filename completion only completes the filename that the 
  202. cursor is at the end of. In the next example files beginning with 
  203. 'b' are searched for and the 'less ' is ignored.
  204. The filename can not be completed further so the possiblities are 
  205. listed.
  206.      C:>less b<Tab>
  207.      backup\   buffer.c  buffer.h  buffer.obj
  208.  
  209. The command line is unaltered and ready for more of the filename 
  210. to be given.
  211.      C:>less b_
  212.      C:>less bu<Tab>
  213. Now the 'u' has been given the filename can be completed further.
  214.      C:>less buffer._
  215. The filename again can not be completed further so the 
  216. possibilities are listed.
  217.      C:>less buffer.<Tab>
  218.      buffer.c  buffer.h  buffer.obj
  219.      C:>less buffer._
  220. The user adds the required extension in this case.
  221.      C:>less buffer.h
  222. When a filename, not a directory name, is completed uniquely a space is
  223. added after the name.
  224.  
  225. Acknowledgements
  226.  
  227. Any comments, problems or suggestions for additions should be 
  228. sent to
  229.         sjr@dcs.warwick.ac.uk
  230.  
  231. Many, many thanks to all those people who took the trouble to 
  232. comment and suggest improvements for Wced. Special thanks to Matthijs.
  233.  
  234.  
  235.  
  236.  
  237.  
  238. Wkeys (v2.1) key programmer for Wced.
  239.  
  240. The Wced program is accompanied by a program called Wkeys. This 
  241. allows Wced's keys to be reprogrammed to suite the user. Wkeys allows
  242. the use of the extended keys, ie F11, on